#ifndef __H_NODE_DEFINES_H__
#define __H_NODE_DEFINES_H__

#include "CClient.h"
#include "baseDbPart.h"
#include "RedisClient.h"
#include "NodeCmd.h"
#include <list>

typedef std::map<int, CClientHandler*>	HandlerList;
typedef std::map<std::string, RedisClient*> RedisClientList;
typedef std::map<std::string, CBaseDbPart*> DBClientList;



class SvrRegParam
{
public:
	SvrRegParam()
	{
		param1 = param2 = param3 = 0;
		str_param = "";
	}
	int param1;
	int param2;
	int param3;
	std::string str_param;
};

class CONFITEM
{
public:
	CONFITEM()
	{
		name = "";
		type = 0;
		count = 0;
	}
	std::string name;
	BYTE  type;
	unsigned int count;
};


typedef struct _ServiceConf
{
	_ServiceConf()
	{
		server_type = 0;
		alloc_type = ALLOC_RANDOM;
		active_count = 1;
		switch_time = 0;
	}
	int server_type;
	int alloc_type;
	int active_count;
	int switch_time;
}ServiceConf;
typedef std::map<int, ServiceConf> ServiceConfMap;

typedef struct _ServiceItem
{
	_ServiceItem()
	{
		svid = 0;
		isOK = false;
		start_time = 0;
	}
	int  svid;
	bool isOK;
	int64 start_time;
}ServiceItem;
typedef std::vector<ServiceItem>  ServiceVect;
typedef std::map<int, ServiceVect> ServiceTypeList;


typedef struct _packetItem
{
	_packetItem()
	{
		dst_type = 0;
		dst_svid = 0;
		mod_num = 0;
		addedTime = 0;
	}
	int dst_type;
	int dst_svid;
	int mod_num;
	int addedTime;
	CRawCache cache;
}PacketBuffer;
typedef  std::list<PacketBuffer*> PacketBufferList;



#endif  //__H_NODE_DEFINES_H__





